<template>
	<view class="row-center text-hide border-b b-color-1">
		<view v-if="!hideBtn" class="p-3-1" @click="$emit('cancel')" hover-class="bg-color-2" hover-start-time="0" hover-stay-time="0">
			<text class="block color-secondary text-m">取消</text>
		</view>
		<view class="flex-1 text-center" :class="[hideBtn ? 'py-3' : '']">
			<text v-if="title" class="text-title color-main font-semibold">{{ title }}</text>
		</view>
		<view v-if="!hideBtn" class="p-3-1" @click="$emit('ok')" hover-class="bg-color-2" hover-start-time="0" hover-stay-time="0">
			<text class="color-primary text-m">确定</text>
		</view>
	</view>
</template>

<script>
export default {
	props: {
		title: String,
		hideBtn: Boolean,
	},
};
</script>
